<%@ page contentType="text/html; charset=utf-8" %>
<%-- 
    JSP Name : list.jsp 
    Description : 대형/상용 지점 리스트
    author ETLee
    since 2012. 6. 28.
    version 1.0
    Modification Information
       since          author              description
    ===========    =============    ===========================
    2012. 6. 28.     ETLee     최초 생성
--%>
<%@ include file="/WEB-INF/jsp/com/include/declare.jspf" %>
<%@ include file="/WEB-INF/jsp/com/include/doctype.jspf" %>
<c:set var="domain">${header.host}</c:set>
<c:choose>
    <c:when test="${domain == 'krdev.hyundai.com'}">
    <!-- krdev.hyundai.com naver api key -->
    <script type="text/javascript" src="http://openapi.map.naver.com/openapi/naverMap.naver?ver=2.0&key=48889bb18d2195c1fc2c1e2ddf276d84"></script>
    </c:when>
    <c:when test="${domain == 'krdev2.hyundai.com'}">
    <!-- krdev2.hyundai.com naver api key -->
    <script type="text/javascript" src="http://openapi.map.naver.com/openapi/naverMap.naver?ver=2.0&key=310e277ce0a999d0f0da4b9ee8128294"></script>
    </c:when>
    <c:when test="${domain == 'www.hyundai.com'}">
    <!-- www.hyundai.com naver api key -->
    <script type="text/javascript" src="http://openapi.map.naver.com/openapi/naverMap.naver?ver=2.0&key=01c5128b3b1da83c6f5ddf3f634ac9f7"></script>
    </c:when>
    <c:when test="${domain == 'www3.hyundai.com'}">
    <!-- www3.hyundai.com naver api key -->
    <script type="text/javascript" src="http://openapi.map.naver.com/openapi/naverMap.naver?ver=2.0&key=c8a77349edc1766a6a2a7e13e67c1926"></script>
    </c:when>
    <c:otherwise>
    </c:otherwise>
</c:choose>
<script type="text/javascript">
    function fnListView(){
        var f = document.searchForm;
        var ckbox = document.getElementsByName('brType');
        for(var i=0; i < 2; i++) {
            if(ckbox[1].checked == true) {
                f.brGuType.value = "A";
            } else if(ckbox[1].checked == false) {
                f.brGuType.value = "B";
            } else {
                f.brGuType.value = "A";
            }
        }
        
        var param2 = $('form[name="searchForm"]').serialize();
        $.ajax({
            type:'POST',
            url:'/kr/biz/selectBizLargeDtlPaging.do',
            data:param2,
            dataType:'html',
            cache:false,
            error:function(){
               alert("팝업의 데이터를 가져오지 못하였습니다."); 
            },
            success:function ( html, status ){
                $('#brListArea').html($.trim(html));
                //checkPopup();
            }
        });   
    }
    
    function fnLinkPage(pageIndex) {
        $("#pageIndex").val(pageIndex);
        fnListView();
    }
    
    function fnView(brCd, brScn, brViewType, popType){
        var param = "brCd="+ brCd +"&brScn="+ brScn +"&brViewType="+ brViewType;
        $.ajax({
            type:'POST',
            url:'/kr/biz/selectBizNwrkMgmtView.do',
            data:param,
            dataType:'html',
            cache:false,
            error:function(){
               alert("팝업의 데이터를 가져오지 못하였습니다."); 
            },
            success:function ( html, status ){
                $('#popContents').html($.trim(html));
                fnInsertPopup('#popContents', popType);
                //checkPopup();
            }
        });
    }

    function fnInsertPopup(area, type){
        $(area).height('');
        if(type != 'pop' || type == ''){
            $('body').dimmedFrame();
            $('.dimmed-frame').css({height:$("#wrap").height()});   
        }
        //$(area).css("display", "block");
        $(area).css({top:$(window).scrollTop()+150}).show();
    }
    
    function closeLayer(area){
        $(area).html('');
        $('.dimmed-frame').remove();
    }
    
    function fnTabLayerToggle(obj){
        $('#tab-wrap > ul > li').attr("class", "");
        $('.service-tab').css('display','none');
        $('#tab-wrap > ul > li').each(function(){
            $('#tab-wrap > ul > li:eq('+ obj +')').attr("class", "on");
            $('.service-tab:eq('+ obj +')').css('display','');
        });
    }

</script> 
</head>
<body onload="fnListView();">
<%//@ include file="/include/layerpopup.jsp" %>
<div id="wrap">
    <%@ include file="/WEB-INF/jsp/com/include/navi_utill_sub.jspf" %>
    <%@ include file="/WEB-INF/jsp/com/include/navi_header.jspf" %>
    <hr />

    <%@ include file="/WEB-INF/jsp/com/include/sub_header_counsel04.jspf" %>
    <hr />

    <div id="container">
        <div id="subtitle-area"><div class="subtitle-area-inner">
            <h4><img src="/kr/images/title/h4_counsel_branch_inquiry02.gif" alt="대형상용지점 조회" /></h4>
            <%@ include file="/WEB-INF/jsp/com/include/location.jspf" %>
        </div></div>
        <div id="article">
            <p class="default-desc"><img src="/kr/images/counsel/txt_counsel_branch_inquiry02_01.gif" alt="고객님께서 찾고자 하는 대형상용지점을 안내해 드립니다." /></p>
            <form name="searchForm" id="searchForm" action="" method="POST" onSubmit="return false;">
            <input type="hidden" name="pageIndex" id="pageIndex" value="${bizNwrkMgmtSearchVO.pageIndex}">
            <input type="hidden" name="bizType" id="bizType" value="2"/>
            <input type="hidden" name="brGuType" id="brGuType" value="A"/>
            <div class="search-sort">
                <label>
                    <input type="checkbox" class="check" name="brType" id="brType" value="4" checked="checked" onclick="fnListView();"/>
                    대형트럭 지점
                </label>
                <label>
                    <input type="checkbox" class="check space" name="brType" id="brType" value="2" checked="checked" onclick="fnListView();" />
                    대형버스 지점
                </label>
            </div>
            </form>
            <h5 class="subsection"><img src="/kr/images/title/h5_counsel_branch_inquiry02_01.gif" alt="검색 결과" /></h5>
        <div id="brListArea"></div>

            <h5 class="subsection"><img src="/kr/images/title/h5_counsel_branch_inquiry02_02.gif" alt="대형 상용 판매과" /></h5>
            <div class="boardlist-wrap">
                <table summary="번호, 지점명, 전화번호, 주소">
                <caption>검색 결과 리스트</caption>
                <colgroup>
                    <col width="8%" />
                    <col />
                    <col width="20%" />
                    <col width="40%" />
                </colgroup>
                <thead>
                <tr>
                    <th scope="col">NO</th>
                    <th scope="col">지점명</th>
                    <th scope="col">전화번호</th>
                    <th scope="col">주소</th>
                </tr>
                </thead>
                <tbody>
                <tr>
                    <td class="num">5</td>
                    <td class="center">당진 판매사무소</td>
                    <td class="center">041-352-8302</td>
                    <td>충청남도 당진시 읍내동 1097번지 2층</td>
                </tr>
                <tr>
                    <td class="num">4</td>
                    <td class="center">평택 판매사무소</td>
                    <td class="center">031-658-8371</td>
                    <td>경기도 평택시 합정동 736-12 현대증권빌딩 6층</td>
                </tr>
                <tr>
                    <td class="num">3</td>
                    <td class="center">군산 판매사무소</td>
                    <td class="center">063-468-5691</td>
                    <td>전라북도 군산시 소룡동 676 군산 A/S 센터 內</td>
                </tr>
                <tr>
                    <td class="num">2</td>
                    <td class="center">강릉 판매사무소</td>
                    <td class="center">033-648-4653</td>
                    <td>강원도 강릉시 옥천동 159 현대빌딩 5층</td>
                </tr>
                <tr>
                    <td class="num">1</td>
                    <td class="center">제천 판매사무소</td>
                    <td class="center">043-642-2115</td>
                    <td>충청북도 제천시 장락동 453-1 첨단공업사 內</td>
                </tr>
                </tbody>
                </table>
            </div>
        </div>
    </div>
    <hr />
    <script>
    appendMETA('WT.ti','대형/상용지점 조회'); 
    </script>  
    <%@ include file="/WEB-INF/jsp/com/include/footer.jspf" %>
    <div id="popContents" style="display:none;"></div>